package ejemplo;
import java.io.*;

public class JavaRunCommand {
	
	
	public static void oneSec() {
	     try {
	       Thread.currentThread().sleep(1000);
	       }
	     catch (InterruptedException e) {
	       e.printStackTrace();
	       }
	     }  
	  public static void manySec(long s) {
	     try {
	       Thread.currentThread().sleep(s * 1000);
	       }
	     catch (InterruptedException e) {
	       e.printStackTrace();
	       }
	     }
	   
	   
	 
		
    public static void main(String args[]) {
    			
    		String s = null;

         	try {
         		
         		
         		Runtime p1;
         		
         		Process p = Runtime.getRuntime().exec( new String[] { "open", "/Applications/safari.app" } );
         		 oneSec();
         		
         	
         		p.destroy();
         		
         	
         		
			
			} catch (IOException e) {
				// TODO Auto-generated catch block
				e.printStackTrace();
			}
    }
}
